package com.example.xd.Contorller;


import com.example.xd.Builder.ItemListBuilder;
import com.example.xd.Entity.NavigationItem;
import com.example.xd.Entity.VideoClassifyItem;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController()
@RequestMapping("/FirstPage")
public class FirstPageController {

    //导航栏类
    @PostMapping("/navigation")
    public List<NavigationItem> getNavigationItem(@RequestParam(value = "Authorization",required = false) String authorization) {
        List<NavigationItem> items = new ItemListBuilder().buildNavigation(authorization);
        return items;
    }

    //分类
@GetMapping("/getVideoClassify")
    public List<VideoClassifyItem> getVideoClassify() {
        List<VideoClassifyItem> items = new ItemListBuilder().buildVideoClassify();
        return items;
}


}
